package org.termine.entity;

import java.io.Serializable;

public class PersonalData implements Serializable {

	private static final long serialVersionUID = -8456149443426354321L;
	
	private Integer personal_data_id;
	private Integer location_id;
	private Integer client_id;
	private Integer provider_id;
	private String forename;
	private String surname;
	private String phone_number;
	private String email;
	private String password;

	public PersonalData copy() {
		PersonalData clone = new PersonalData();
		clone.setPersonal_data_id(personal_data_id);
		clone.setLocation_id(location_id);
		clone.setClient_id(client_id);
		clone.setProvider_id(provider_id);
		clone.setForename(forename);
		clone.setSurname(surname);
		clone.setPhone_number(phone_number);
		clone.setEmail(email);
		clone.setPassword(password);
		return clone;
	}

	/*
	 * Getters & Setters
	 */
	public boolean isProvider() {
		return client_id != null && provider_id != null;
	}

	public boolean isClient() {
		return client_id != null && provider_id == null;
	}

	/*
	 * Getters & Setters
	 */
	public Integer getPersonal_data_id() {
		return personal_data_id;
	}

	public void setPersonal_data_id(Integer personal_data_id) {
		this.personal_data_id = personal_data_id;
	}

	public Integer getLocation_id() {
		return location_id;
	}

	public void setLocation_id(Integer location_id) {
		this.location_id = location_id;
	}

	public Integer getClient_id() {
		return client_id;
	}

	public void setClient_id(Integer client_id) {
		this.client_id = client_id;
	}

	public Integer getProvider_id() {
		return provider_id;
	}

	public void setProvider_id(Integer provider_id) {
		this.provider_id = provider_id;
	}

	public String getForename() {
		return forename;
	}

	public void setForename(String forename) {
		this.forename = forename;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getPhone_number() {
		return phone_number;
	}

	public void setPhone_number(String phone_number) {
		this.phone_number = phone_number;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
